<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 需要观察盒子移动的效果 需要加 hover 使用过渡 */
      .box {
        width: 100px;
        height: 100px;
        background-color: #f00;
        transition: all 2s;
      }
      .box:hover {
        transform: translateX(800px);
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
  </body>
</html>
